//
//  NSData+encode.h
//  helper
//
//  Created by huangyi on 12-10-29.
//  Copyright (c) 2012年 huangyi. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSData (encode)

-(NSString*)base64;

-(NSData*)aes256:(NSString*)key;
-(NSData*)aes256dec:(NSString*)key;
-(NSData*)blowfish:(NSString*)key;
-(NSData*)blowfishdec:(NSString*)key;
-(NSData*)des:(NSString*)key;
-(NSData*)desdec:(NSString*)key;
-(NSData*)rc4:(NSString*)key;
-(NSData*)rc4dec:(NSString*)key;

//shortcut
-(NSData*)encrypt;
-(NSData*)decrypt;

@end

extern NSString* file_enc_rc4(NSString *inPath);
extern NSString* file_dec_rc4(NSString *inPath);
